export const constantRoute = [
  {
    path: '/',
    name: 'layout',
    component: () => import('../views/layout/index.vue'),
    meta: {
      title: '',
      hidden: false,
      icon: ''
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled'
        }
      }
    ]
  },
  {
    path: '/404',
    component: () => import('../views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'DocumentDelete'
    }
  },
  {
    path: '/screen',
    component: () => import('../views/screen/index.vue'),
    name: '数据大屏',
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'DocumentDelete'
    }
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/index.vue'),
    meta: {
      title: '登录', //菜单标题
      hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
      icon: 'Promotion' //菜单文字左侧的图标,支持element-plus全部图标
    }
  },
  {
    path: '/demo',
    name: '后台demo',
    component: () => import('../views/layout/index.vue'),
    meta: {
      title: 'demo',
      icon: 'Goods'
    },
    redirect: '/demo/VueDraggable',
    children: [
      {
        path: '/demo/VueDraggable',
        component: () => import('@/views/demo/draggable/index.vue'),
        name: 'VueDraggable',
        meta: {
          title: '拖拽',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/office',
        component: () => import('@/views/demo/office/index.vue'),
        name: 'office',
        meta: {
          title: 'office系列文件预览',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/xuni',
        component: () => import('@/views/demo/xuni/index.vue'),
        name: 'xuni',
        meta: {
          title: '虚拟列表',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/fuwenben',
        component: () => import('@/views/demo/fuwenben/index.vue'),
        name: 'fuwenben',
        meta: {
          title: '富文本',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/lodong',
        component: () => import('@/views/demo/lodong/index.vue'),
        name: 'lodong',
        meta: {
          title: 'lodong',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/image',
        component: () => import('@/views/demo/image/index.vue'),
        name: 'image',
        meta: {
          title: '图片上传剪裁',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/websorket',
        component: () => import('@/views/demo/websocket/index.vue'),
        name: 'websorket',
        meta: {
          title: 'websorket',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/print',
        component: () => import('@/views/demo/print/index.vue'),
        name: 'print',
        meta: {
          title: '打印',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/vxe-table',
        component: () => import('@/views/demo/vxeTable/index.vue'),
        name: 'vxe-table',
        meta: {
          title: 'vxe-table',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      },
      {
        path: '/demo/vueEsign',
        component: () => import('@/views/demo/vueEsign/index.vue'),
        name: 'vueEsign',
        meta: {
          title: 'vxe-table',
          icon: 'ShoppingCartFull',
          hidden: false
        }
      }
    ]
  }
]

//异步路由
export const asnycRoute = [
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('../views/layout/index.vue'),
    meta: {
      title: '权限管理',
      icon: 'Lock',
      hidden: false
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: () => import('@/views/acl/user/index.vue'),
        name: 'User',
        meta: {
          hidden: false,
          title: '用户管理',
          icon: 'User'
        }
      },
      {
        path: '/acl/role',
        component: () => import('@/views/acl/rule/index.vue'),
        name: 'Role',
        meta: {
          hidden: false,
          title: '角色管理',
          icon: 'UserFilled'
        }
      },
      {
        path: '/acl/permission',
        component: () => import('@/views/acl/permission/index.vue'),
        name: 'Permission',
        meta: {
          hidden: false,
          title: '菜单管理',
          icon: 'Monitor'
        }
      }
    ]
  },
  {
    path: '/product',
    component: () => import('../views/layout/index.vue'),
    name: 'Product',
    meta: {
      title: '商品管理',
      icon: 'Goods'
    },
    redirect: '/product/trademark',
    children: [
      {
        path: '/product/trademark',
        component: () => import('@/views/shop/pp/index.vue'),
        name: 'Trademark',
        meta: {
          title: '品牌管理',
          icon: 'ShoppingCartFull'
        }
      },
      {
        path: '/product/attr',
        component: () => import('@/views/shop/sx/index.vue'),
        name: 'Attr',
        meta: {
          title: '属性管理',
          icon: 'ChromeFilled'
        }
      },
      {
        path: '/product/spu',
        component: () => import('@/views/shop/spu/index.vue'),
        name: 'Spu',
        meta: {
          title: 'SPU管理',
          icon: 'Calendar'
        }
      },
      {
        path: '/product/sku',
        component: () => import('@/views/shop/sku/index.vue'),
        name: 'Sku',
        meta: {
          title: 'SKU管理',
          icon: 'Orange'
        }
      }
    ]
  }
]
